<?php
	$config_theme = C('config_theme');
	$config_template = C('config_template');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  <?php if (ROUTE == 'product/product') { ?>
	  xmlns:og="http://ogp.me/ns#"
	  <?php if (C('config_fb_appid')) { ?>
	  xmlns:fb="http://www.facebook.com/2008/fbml"
	  <?php } ?>
	  <?php } ?>
	  dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php foreach ($this->document->getOpenGraph() as $property => $content) { ?>
<meta property="<?php echo $property ?>" content="<?php echo $content; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="themes/<?php echo $config_template;?>/stylesheet/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="themes/<?php echo $config_template;?>/stylesheet/stylesheet.css" />
<link rel='stylesheet' type='text/css' href='themes/<?php echo $config_template;?>/stylesheet/font-lora.css'>
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>

<link rel="stylesheet" type="text/css" href="static/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" href="static/javascript/jquery/colorbox/colorbox.css" />
<?php if($config_theme['skin'] != 'default' ){ ?>
<link rel="stylesheet" type="text/css" href="themes/<?php echo $config_template;?>/skins/<?php echo $config_theme['skin'];?>/stylesheet/stylesheet.css" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="themes/<?php echo $config_template;?>/stylesheet/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="themes/<?php echo $config_template;?>/stylesheet/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="themes/<?php echo $config_template;?>/stylesheet/theme-responsive.css" />

<script type="text/javascript" src="static/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="static/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="static/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script type="text/javascript" src="static/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="static/javascript/jquery/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="themes/javascript/common.js"></script>
<script type="text/javascript" src="themes/<?php echo $config_template;?>/javascript/common.js"></script>
<script type="text/javascript" src="themes/javascript/bootstrap/bootstrap.min.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<style>
	<?php if( $config_theme['theme_width'] &&  $config_theme['theme_width'] != 'auto' ) { ?>
			#page-container .container { max-width:<?php echo $config_theme['theme_width'];?>; width:auto;}
	<?php } ?>
</style>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="themes/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="themes/default/stylesheet/ie6.css" />
<script type="text/javascript" src="static/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<!--[if lt IE 9]>
<script type="text/javascript" src="themes/javascript/respond.min.js"></script>
<script type="text/javascript" src="themes/javascript/html5.js"></script>
<![endif]-->
</head>
<body class="<?php echo $config_theme['body_pattern']?>">
<section id="page-container">
<section id="header">
		<div class="container">
			<div class="row-fluid">
				<div class="span5">
				  <?php if (C('config_logo')) { ?>
				  <div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo image_url(C('config_logo')); ?>" title="<?php echo C('config_name'); ?>" alt="<?php echo C('config_name'); ?>" /></a></div>
				  <?php } ?>
				</div>

				<div class="header-right span7 pull-right ">
					<div class="wrap-link clearfix">						
						<div class="links pull-right">
						  <a href="<?php echo $home; ?>"><?php echo $_['text_home']; ?></a>
						  <a href="<?php echo US('account/wishlist'); ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>
						  <a href="<?php echo US('account/account') ?>"><?php echo $_['text_account']; ?></a>
						  <a href="<?php echo U('checkout/cart'); ?>"><?php echo $_['text_shopping_cart']; ?></a>
						  <a href="<?php echo US('checkout/checkout'); ?>"><?php echo $_['text_checkout']; ?></a>
						</div>
					</div>
					<div class="login clearfix">
						<div class="currency pull-left">
							<?php echo $currency; ?>
						</div> 
						<div class="language pull-left">
							<?php echo $language; ?>
						</div> 
						<?php if (!$logged) { ?>
						<?php echo $text_welcome; ?>
						<?php } else { ?>
						<?php echo $text_logged; ?>
						<?php } ?> 
					</div>
					<div class="cart-top pull-right">
						<?php echo $cart; ?>
					</div>
				</div>
			</div>
		</div>
</section>
<section id="mainnav">
	<div class="container">
		<div class="mainnav-inner">
			<div class="row-fluid">
		  <nav class="span9" id="mainmenu">
		  	<div class="navbar">
			<div class="navbar-inner">
			<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
			  <span class="icon-bar"></span>
			  <span class="icon-bar"></span>
			  <span class="icon-bar"></span>
			</a>
		 <div class="nav-collapse collapse">
	
		<ul class="nav megamenu">
			<li class="homepage">
					<a href="<?php echo ROOT; ?>"><span class="menu-title"><?php echo $_['text_home'];?></span></a></li>
					<?php echo pav_mega_menu($categories);?>
					
		</ul></div></div>
</div></nav><div id="search" class="span3">
					<div class="button-search"></div>
					<input type="text" name="search" placeholder="<?php echo $_['text_search']; ?>" value="<?php echo $search; ?>" />
					</div>
			</div>
		</div>
	</div>
</section>

<section id="sys-notification"><div class="container"><div id="notification"></div></div></section>
<section id="columns"><div class="container"><div class="row-fluid">